<?php
header("Content-type: application/json");
require('../../db.php');


/***** PROCESS FOR SPECIFIC NAME REQUEST *****/

//$ns = filter_var($_POST['wk_ns'], FILTER_SANITIZE_STRIPPED);

//if(isset($ns)) {
//if(filter_var($_POST['wk_ns'], FILTER_SANITIZE_STRIPPED)) {
	
	$n = $db->prepare("SELECT DISTINCT model_name FROM cal");
	$n->execute();

	$m_nms['model_name'] = $n->fetchAll(PDO::FETCH_COLUMN);
	
	echo json_encode($m_nms);

/*	print "<pre>";
		print_r(json_encode($m_nms));
	print "</pre>"; 
*/


/*} else {
	print "no data...";
}*/